= simple_form_for @editor, wrapper: :input_form do |f|
  = f.error_notification

  - @editor.errors.full_messages.each do |message|
    li = message

  = f.input :telephone, label: '请填写小区主管理员号码', placeholder: "手机号码", required: false
  = f.input :password, label: '密码', placeholder: "请填写密码", required: false
  = f.input :name, label: '姓名', placeholder: "请填写姓名", required: false
  - if @current_editor.system?
    = f.input :village_id, collection: @villages.pluck(:name, :id)
  - elsif @current_editor.estate?
    = f.input :building_id, collection: @buildings.pluck(:name, :id)
  = f.button :submit, '保存', class: "btn btn-primary"
  = link_to '返回', editors_path, class: "btn btn-info"
